package wei.qiang.ye.springcomponentdemo.config;

import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.FilterType;
import org.springframework.stereotype.Service;

@Configuration
/**
 * 只将Service纳入IOC容器，并且需要用useDefaultFilters = false来关闭Spring默认的扫描策略才能让我们的配置生效
 * （Spring Boot入口类的@SpringBootApplication注解包含了一些默认的扫描策略）
 */
@ComponentScan(value = "wei.qiang.ye.springcomponentdemo",
 includeFilters = {
    @ComponentScan.Filter(type=FilterType.ANNOTATION ,classes = Service.class)
 }, useDefaultFilters = false)
public class WebConfig3 {

}